package org.sport.dbInterface;

import org.sport.model.entityModel.SporthistorytableEntity;
import org.sport.model.entityModel.UsertableEntity;

import java.util.List;

/**
 * Created by Allen on 2017/9/20.
 *
 */
public interface SpoHisOperation {

    /*
    * 增     ：增加UserActMa表中一条数据
    * */
    boolean                                 addSpoHisOne(SporthistorytableEntity sporthis);

    /*
    * 改     ：通过actId进行更改
    * */
    boolean                                 updateSpoHisOne(SporthistorytableEntity sporthis);

    /*
    * 删     : 通过actId来进行删除，因为actId是唯一的
    * */
    boolean                                 delSpoHisByActId(SporthistorytableEntity sporthis);

    /*
    * 查
    * */
    //-----------------------------------------          通过活动ID找到UserActMa     -----------------------
 //   SporthistorytableEntity                 findSpoHisByActId(SporthistorytableEntity sporthis);

    //-----------------------------------------          通过活动ID找到UserActMa     -----------------------
    SporthistorytableEntity                 findOneByUserIdAndStartTime(SporthistorytableEntity sporthis);

    //-----------------------------------------          通过活动ID找到UserActMa     -----------------------
    SporthistorytableEntity                 findSpoByStartTime(SporthistorytableEntity sporthis);



    //----------------------------------------           通过userID查询UserAcMa     -----------------------
    List<SporthistorytableEntity>           findSpoHisByUserId(UsertableEntity usertableEntity);



    /*
    * 列表
    * */
    List<SporthistorytableEntity>           findSpoHis();
}
